
import {
    toast
} from 'nc-lightapp-front';


import language from '../../language';

import getExportInitData from '../../components/ExportModal/functions/getExportInitData';

export default function(type) {

    const {
        editTable
    }  = this.props;
    if(type === 'cur') {
        const highLightRow = editTable.getClickRowIndex('ncc60071701list');
        const checkedRows = editTable.getCheckedRows('ncc60071701list');
        if(!highLightRow && checkedRows.length <= 0) {
            toast({
                color: 'warning',
                content: language['hi6007-000092']
            });
        }
        else {
            getExportInitData.call(this, 'cur');
        }
    }
    else {
        getExportInitData.call(this, 'all');
    }
    

}